<template>
  <div class="system-type-wrap">
    <div class="header">
      <span>管理后台</span>
      <img class="img-down" src="../../assets/images/down.png" />
    </div>
    <div class="systems">
      <div @click="handleGo('realty')" class="ststem-item">
        <img src="../../assets/images/logo2.png" alt="" />
        <div class="item-title">
          <div class="title-left">美窝房产</div>
          <div class="type">管理后台</div>
        </div>
        <img src="../../assets/images/more.png" alt="" />
      </div>
      <div @click="handleGo('applet')" class="ststem-item">
        <img src="../../assets/images/logo1.png" alt="" />
        <div class="item-title">
          <div class="title-right">留学生小程序</div>
          <div class="type">管理后台</div>
        </div>
        <img src="../../assets/images/more.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue';
  // import { UserDropDown } from '/@/layouts/default/header/components';
  // import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
  import router from '/@/router';
  import { PageEnum } from '/@/enums/pageEnum';
  import { appStore } from '/@/store/modules/app';
  export default defineComponent({
    components: {
      // UserDropDown,
    },
    setup() {
      // const { getHeaderTheme } = useHeaderSetting();
      const handleGo = async (v) => {
        if (v === 'realty') {
          await appStore.setAppType(1);
          await router.replace(PageEnum.REALTY_HOME);
        } else {
          await appStore.setAppType(0);
          await router.replace(PageEnum.BASE_HOME);
        }
      };
      return {
        // getHeaderTheme,
        handleGo,
      };
    },
  });
</script>

<style lang="less" scoped>
  .system-type-wrap {
    background-image: url('../../assets/images/back.png');
    height: 100%;
    .header {
      text-align: center;
      color: #fff;
      font-size: 36px;
      padding-top: 50px;
      .img-down {
        margin: 60px auto;
      }
    }
    .systems {
      margin-top: 90px;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      .ststem-item {
        width: 480px;
        height: 370px;
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0 0 8px #666;
        padding: 50px;
        margin: 0 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        cursor: pointer;
        transition: all 0.3s;
        .item-title {
          width: 80%;
          border: 1px solid #ccc;
          border-radius: 10px;
          text-align: center;
          margin: 40px 0;
          padding: 10px;
          .title-left {
            color: #fc676e;
            font-size: 30px;
            font-weight: bold;
          }
          .title-right {
            color: #2e3191;
            font-size: 30px;
            font-weight: bold;
          }
          .type {
            font-size: 24px;
            color: #888;
            font-weight: bold;
          }
        }
        &:hover {
          box-shadow: 0 0 18px #333;
        }
      }
    }
  }
</style>
